#include "precomp.h"

#pragma once

#include "GameObject.h"
#include "Map.h"
#include "Player.h"
#include "AI.h"
#include "HUD.h"

#define WALL_DIR "./images/wall.png"
#define CH_BLUE_DIR "./images/ch_blue.png"
#define CH_RED_DIR "./images/ch_red.png"

#define WINDOW_WIDTH 640
#define WINDOW_HEIGHT 480

#define GAME_LOSE 0
#define GAME_WIN 1
#define GAME_CANCELED 2

class Game{
public:
	Game(const char* map_file, CL_DisplayWindow *window);

	~Game();

	int start();

	void lose();

	void win();

private:
	void _hold();
	void _draw_end_text(CL_String text, int font_size = 50, const wchar_t* font_type = L"Tahoma", CL_Color color = CL_Colord::red);

	Map *_map;
	AI *_ai;
	Player *_player;
	HUD *_hud;

	CL_DisplayWindow *_window;
	CL_GraphicContext *_gc;
	CL_InputContext *_ic;
};